/**
 * Created with Intellij IDEA
 * Description
 * User:ASUS
 * Date:2024-07-24
 * Time:15:46
 */

public class Demo {
    public static void main(String[] args) {
       int a=10;
       int b=20;
       int max=a>b?a:b;
    }
    public static void main5(String[] args) {
        int a=10;
        int b=20;
        System.out.println(a|b);
    }
    public static void main4(String[] args) {
        int a=1;
        int b=2;
        //=表示赋值
        //==表示相等
        System.out.println(a==b);
        System.out.println(a!=b);
        System.out.println(a<b);
        System.out.println(a>b);
        System.out.println(a<=b);
        System.out.println(a>=b);
    }
    public static void main3(String[] args) {
        int a=1;
        a++;//后置++，结果为2
        System.out.println(a++);//先使用变量原来值，表达式结束时给变量+1，结果为2
        System.out.println(a);//结果为3

        ++a;//前置++
        System.out.println(++a);//先给变量+1，然后使用变量中的值，结果为5
        System.out.println(a);//结果为5
    }
    public static void main2(String[] args) {
        int a=1;
        a+=2;//相当于a=a+2
        System.out.println(a);//输出3
    }
    public static void main1(String[] args) {
        int a=5;
        int b=3;
        System.out.println(a+b);
        System.out.println(a-b);
        System.out.println(a*b);
        System.out.println(a/b);
        System.out.println(a%b);//相当于除法的余数
    }
}
